package com.example.employee;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

@RestController
@RequestMapping("/employee")
@Slf4j
public class EmployeeController {

  @GetMapping("/message")
  String getEmployeeMessage(HttpServletRequest request) {
    log.info("receive request from: " + request.getRemoteHost());
    return request.getRemoteHost() + request.getRequestURI() + "response from employee controller";
  }
}
